import re
import time

a = "('tom', 'a', datetime.datetime(2021, 4, 21, 11, 12, 36))"
b = "('tom', 'about', datetime.datetime(2021, 4, 21, 11, 12, 36))"

c = re.findall(r'(\d+)', a)
print(c)
'%Y-%M-%d : %H-%m-%S'
datetime = c[0] + '-' + c[1] + '-' + c[2] + ':' + c[3] + '-' + c[4] + '-' + c[5]
ss = time.strptime(datetime,"%Y-%m-%d:%H-%M-%S")

print(ss)
